<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Core Plot (Mac OS): MacOnly/CPTPlatformSpecificFunctions.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="core-plot-logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Core Plot (Mac OS)
   
   </div>
   <div id="projectbrief">Cocoa plotting framework for Mac OS X and iOS</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript" src="dynsections.js"></script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Animation&#160;&&#160;Constants</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_c_p_t_platform_specific_functions_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">MacOnly/CPTPlatformSpecificFunctions.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#import &quot;<a class="el" href="_c_p_t_definitions_8h_source.html">CPTDefinitions.h</a>&quot;</code><br/>
<code>#import &lt;Foundation/Foundation.h&gt;</code><br/>
<code>#import &lt;QuartzCore/QuartzCore.h&gt;</code><br/>
</div><div class="textblock"><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Include dependency graph for CPTPlatformSpecificFunctions.h:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="_c_p_t_platform_specific_functions_8h__incl.png" border="0" usemap="#_mac_only_2_c_p_t_platform_specific_functions_8h" alt=""/></div>
<map name="_mac_only_2_c_p_t_platform_specific_functions_8h" id="_mac_only_2_c_p_t_platform_specific_functions_8h">
<area shape="rect" id="node3" href="_c_p_t_definitions_8h.html" title="CPTDefinitions.h" alt="" coords="269,86,397,117"/></map>
</div>
</div>
<p><a href="_c_p_t_platform_specific_functions_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Graphics Context Save Stack</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_c_p_t_platform_specific_functions_8h.html#a749370a9ff558a64e0c8e335d8788dac">CPTPushCGContext</a> (<a class="elRef" href="http://developer.apple.com/documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html#//apple_ref/doc/c_ref/CGContextRef.html">CGContextRef</a> context)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pushes the current AppKit graphics context onto a stack and replaces it with the given Core Graphics context.  <a href="#a749370a9ff558a64e0c8e335d8788dac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af83544397fc336d1c14e66f2b7e473be"></a><!-- doxytag: member="CPTPlatformSpecificFunctions.h::CPTPopCGContext" ref="af83544397fc336d1c14e66f2b7e473be" args="(void)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_c_p_t_platform_specific_functions_8h.html#af83544397fc336d1c14e66f2b7e473be">CPTPopCGContext</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pops the top context off the stack and restores it to the AppKit graphics context. <br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Graphics Context</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3be5490002256d9807df1586581550b9"></a><!-- doxytag: member="CPTPlatformSpecificFunctions.h::CPTGetCurrentContext" ref="a3be5490002256d9807df1586581550b9" args="(void)" -->
<a class="elRef" href="http://developer.apple.com/documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html#//apple_ref/doc/c_ref/CGContextRef.html">CGContextRef</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_c_p_t_platform_specific_functions_8h.html#a3be5490002256d9807df1586581550b9">CPTGetCurrentContext</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the default graphics context. <br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Color Conversion</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://developer.apple.com/documentation/GraphicsImaging/Reference/CGColor/Reference/reference.html#//apple_ref/doc/c_ref/CGColorRef.html">CGColorRef</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_c_p_t_platform_specific_functions_8h.html#a3580904e417acab705123a9d25c03a8c">CPTCreateCGColorFromNSColor</a> (<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a> *nsColor)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="elRef" href="http://developer.apple.com/documentation/GraphicsImaging/Reference/CGColor/Reference/reference.html#//apple_ref/doc/c_ref/CGColorRef.html">CGColorRef</a> from an <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a>.  <a href="#a3580904e417acab705123a9d25c03a8c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="_c_p_t_definitions_8h.html#a722329b2597462efab5dc7fc7057b27c">CPTRGBAColor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_c_p_t_platform_specific_functions_8h.html#aa788843028b5cdba8df9b77d759d286f">CPTRGBAColorFromNSColor</a> (<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a> *nsColor)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a CPTRGBAColor from an <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a>.  <a href="#aa788843028b5cdba8df9b77d759d286f"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"></div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a3580904e417acab705123a9d25c03a8c"></a><!-- doxytag: member="CPTPlatformSpecificFunctions.h::CPTCreateCGColorFromNSColor" ref="a3580904e417acab705123a9d25c03a8c" args="(NSColor *nsColor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://developer.apple.com/documentation/GraphicsImaging/Reference/CGColor/Reference/reference.html#//apple_ref/doc/c_ref/CGColorRef.html">CGColorRef</a> <a class="el" href="_c_p_t_platform_specific_functions_8h.html#a3580904e417acab705123a9d25c03a8c">CPTCreateCGColorFromNSColor</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a> *&#160;</td>
          <td class="paramname"><em>nsColor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="elRef" href="http://developer.apple.com/documentation/GraphicsImaging/Reference/CGColor/Reference/reference.html#//apple_ref/doc/c_ref/CGColorRef.html">CGColorRef</a> from an <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a>. </p>
<p>The caller must release the returned <a class="elRef" href="http://developer.apple.com/documentation/GraphicsImaging/Reference/CGColor/Reference/reference.html#//apple_ref/doc/c_ref/CGColorRef.html">CGColorRef</a>. Pattern colors are not supported.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">nsColor</td><td>The <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="elRef" href="http://developer.apple.com/documentation/GraphicsImaging/Reference/CGColor/Reference/reference.html#//apple_ref/doc/c_ref/CGColorRef.html">CGColorRef</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a749370a9ff558a64e0c8e335d8788dac"></a><!-- doxytag: member="CPTPlatformSpecificFunctions.h::CPTPushCGContext" ref="a749370a9ff558a64e0c8e335d8788dac" args="(CGContextRef context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="_c_p_t_platform_specific_functions_8h.html#a749370a9ff558a64e0c8e335d8788dac">CPTPushCGContext</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="elRef" href="http://developer.apple.com/documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html#//apple_ref/doc/c_ref/CGContextRef.html">CGContextRef</a>&#160;</td>
          <td class="paramname"><em>newContext</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Pushes the current AppKit graphics context onto a stack and replaces it with the given Core Graphics context. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newContext</td><td>The graphics context. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa788843028b5cdba8df9b77d759d286f"></a><!-- doxytag: member="CPTPlatformSpecificFunctions.h::CPTRGBAColorFromNSColor" ref="aa788843028b5cdba8df9b77d759d286f" args="(NSColor *nsColor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_c_p_t_definitions_8h.html#a722329b2597462efab5dc7fc7057b27c">CPTRGBAColor</a> <a class="el" href="_c_p_t_platform_specific_functions_8h.html#aa788843028b5cdba8df9b77d759d286f">CPTRGBAColorFromNSColor</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a> *&#160;</td>
          <td class="paramname"><em>nsColor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a CPTRGBAColor from an <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a>. </p>
<p>Pattern colors are not supported.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">nsColor</td><td>The <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html">NSColor</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The CPTRGBAColor. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_c_p_t_platform_specific_functions_8h.html">CPTPlatformSpecificFunctions.h</a>      </li>

    <li class="footer">Generated by <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a></li>
   </ul>
 </div>


</body>
</html>
